/**
 * Created by Administrator on 2017/6/26.
 */
$(function () {
  $('#loginBtn').on('click', function () {
    var user = {
      name: $('#username').val(),
      password: $('#password').val(),
      remember: $('#remember').is(':checked')
    }
    console.log(user);
    $.post('/user/login', user, function (data) {
      if (data.status == 'true') {  //登录成功
        window.location.href = data.url;
      } else {  //登录失败
        $('span.tip').removeClass('sr-only').text(data.msg);
      }
    })
  });
});